import { useSelector } from 'react-redux'
import type { UserState } from '../../store/user-reducer/types'
import { StateType } from '../../store/types'

export default function useGetUserInfo() {
  const { username, nickname } = useSelector<StateType>(state => state.user) as UserState

  return { username, nickname }
}
